fn main() {
    let nmslwcnm = Bilibili {
        vid: 20240228,
        author: String::from("Extra"),
        title: String::from("Hello world!")
    };
    let lgqm = Youtube {
        vid: 20240228,
        writer: String::from("吹牛者"),
        title: String::from("临高启明")
    };
    println!("{}", nmslwcnm.share());
    println!("{}", lgqm.share());
}

trait Share {
    fn share(&self) -> String;
}
struct Bilibili {
    vid: u64,
    author: String,
    title: String,
}
struct Youtube {
    vid: u64,
    writer: String,
    title: String
}
impl Share for Bilibili {
    fn share(&self) -> String {
        format!("{}", self.title)
    }
}
impl Share for Youtube {
    fn share(&self) -> String {
        format!("{}", self.title)
    }
}
